//
//  UIBUtton+extension.swift
//  newCard
//
//  Created by jyh on 2017/12/7.
//  Copyright © 2017年 jyh. All rights reserved.
//

import UIKit

extension UIButton {
    
    
    convenience init(frame: CGRect,backColor: UIColor = UIColor.clear, titleColorNormal: UIColor = UIColor.black, titleColorHigh: UIColor = UIColor.lightText, fontSize: CGFloat = 14, cornerRadius: CGFloat = 0, title: String) {
        
        self.init(frame: frame)
        
        self.titleLabel?.font = UIFont.systemFont(ofSize: fontSize)
        self.layer.cornerRadius = cornerRadius
        self.setTitle(title, for: .normal)
        self.backgroundColor = backColor
        self.setTitleColor(titleColorNormal, for: .normal)
        self.setTitleColor(UIColor.lightText, for: .highlighted)
    }
}
